/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.smn.jsf;

import com.smn.domain.Share;
import javax.ejb.EJB;
import javax.inject.Named;
import javax.enterprise.context.Dependent;

/**
 *
 * @author Abdulaziz
 */
@Named(value = "mycont")
@Dependent
public class mycont {

    @EJB
    private com.smn.dao.ShareFacade ejbFacade;
    /** Creates a new instance of mycont */
    public mycont() {
    }
    
    public String anan(){
        
        System.out.println("Before persist");
        Share sh = new Share();
        sh.setName("Hola world");
        ejbFacade.create(sh);
        System.out.println("After persist");
        return "share/List";
    }
}
